<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>

<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" type="text/css" href="<%=basePath%>jslib/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>jslib/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>jslib/easyui/demo/demo.css">
<script type="text/javascript" src="<%=basePath%>jslib//easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>jslib/easyui/locale/easyui-lang-zh_CN.js"></script>

<title>Load Dynamic ComboBox Data - jQuery EasyUI Demo(1.5.3)</title>

<script type="text/javascript">
		
	$(function(){
		$('#cc').combobox({
		    url:'./combobox_data1.json',
		    valueField:'id',
		    textField:'text'
		});
	});
	
</script>
</head>
<body>

	<h2>动态加载下拉框数据</h2>
	<div class="demo-info">
		<div class="demo-tip icon-tip"></div>
		<div>点击按钮后加载下拉列表框的数据..</div>
	</div>
	<div style="margin:20px 0;">
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#language').combobox('reload', 'combobox_data1.json')">LoadData</a>
	</div>

	<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
		<div style="margin-bottom:20px">
			<input id="language" class="easyui-combobox" name="language" style="width:100%;" data-options="
					valueField: 'id',
					textField: 'text',
					label: 'Language:',
					labelPosition: 'top'
					">
		</div>
	</div>
	
	<br>
	<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
		<div style="margin-bottom:20px">
			<select id="cc" style="width:100%;"></select>
		</div>
	</div>
	
	<br>
	<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
		<div style="margin-bottom:20px">
			 <input class="easyui-combobox" name="language2" style="width:100%;" data-options="
                    url:'combobox_data1.json',
                    method:'get',
                    valueField:'id',
                    textField:'text',
                    panelHeight:'auto',
                    label: 'Language:',
                    labelPosition: 'top'
                    ">
		</div>
	</div>
	<script type="text/javascript">
	
	</script>
</body>
</html>